/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hcmus.fit.master.sevensea.util;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author hvp
 */
public class Queue<T>
{
    private List<T> _queue;

    public Queue()
    {
        _queue = new ArrayList<T>();
    }

    public void Clear()
    {
        _queue.clear();
    }
    public void Enqueue(T obj)
    {
        _queue.add(obj);
    }
    public Object Dequeue()
    {
        Object obj = _queue.get(0);
        _queue.remove(0);
        return obj;
    }

    public int Count()
    {
        return _queue.size();
    }
}
